Image resizing is an operation that is used in many different digital image processing chains. Often digital output devices such as printers and softcopy displays require digital images of a particular image resolution. When it is desired to display digital images having a different resolution, it is necessary to use an image resizing operation to produce an image of the desired resolution. For example, a particular printer may be designed to print 600 dpi images. To print a 200 dpi input image, it would be necessary to resize the image by up-sampling the image by a factor of 3×. In other cases, it may be necessary to down-sample the image when the input image has a higher resolution than the printer requires.
Another application where image resizing can be required is when images need to be stored in a limited amount of memory, or sent across a communication link having a limited amount of bandwidth. In this ease, high resolution images are down-sampled to create smaller images having a lower resolution.
FIG. 1 shows an example of a system 100 for printing images where image resizing is typically applied. The system 100 has two components: a host device 101, and a printer 102, connected by a communication link 110. The host device 101 could, for example, be a personal computer connected to the printer using a USB cable. Alternately, the host device 101 could be some other device such as a digital camera that can communicate directly with the printer 102 using a wireless connection, such as a wireless connection using the well-known Bluetooth protocol.
The host device 101 performs host device processing 106 to process an input digital image 104 to produce a processed digital image 108. For the example where the host device 101 is a personal computer, the host device processing 106 would typically occur in a printer driver. Conventionally, printer drivers will receive the input digital image 104 from a host application using standard operating system interfaces. Generally, the printer driver would receive input digital images 104 having a specific image resolution (e.g., 600 dpi). The input digital image 104 may be a photographic image, or alternately may be some other form of digital image, such as documents containing text and graphics.
The host device processing 106 can perform a variety of different image processing operations depending on the requirements of the particular printer 102. Examples of such image processing operations would include color correction, sharpening, halftoning and resizing. Typically, the printer 102 may require that the host device 101 supply digital image data of a particular resolution. The required resolution may correspond to the native resolution of the printer 102, or may correspond to a resolution that will enable the printer to receive the image data at a sufficient speed to support the printer's optimum throughput. For example, if the printer is specified to print a certain number of pages per minute in a draft printing mode, the image data must be supplied to the printer at that rate. In this case, it may be necessary to limit the resolution of the image data being sent to the printer in order to achieve the required speed, particularly when using low bandwidth communication links such as wireless links. Therefore, it will often be necessary for the host device processing 106 to down-sample the image using a resizing operation.
The printer 102 receives the processed digital image 108 from the host device 101 via the communication link 110. The printer 102 applies printer processing 112 to produce a print-ready digital image 114. The printer processing could include a wide variety of image processing operations including color correction, resizing, sharpening, halftoning, and swath generation. The print-ready digital image 114 is then passed to a printer engine 116 to produce the output printed image 118.
Consider the case where the host device 101 receives an input digital image 104 having a 600 dpi resolution, but the printer 102 requires that the host device 101 supply a processed digital image 108 having a 300 dpi resolution. In this case, the host device processing must apply a resizing operation that applies a 2× down-sampling of the image data. The down-sampling operation can sometimes result in a loss of image quality. This is particularly true when the input digital image 104 contains fine details, such as single pixel width lines.
FIG. 2A shows an example of a grayscale input digital image 120 having a pair of crossed single pixel width lines. The input digital image 120 has a background comprised of white pixels 122 having an 8-bit code value of 255. The single pixel width lines are shown as black pixels 124 having an 8-bit code value of 0.
One common algorithm that is used in many resizing operations is cubic interpolation. With this method, interpolated pixels are determined by performing a weighted average of pixel values for a neighborhood of input pixels. Some resizing algorithms employ a bicubic interpolation algorithm which considers a 2-dimensional neighborhood of pixels. In other implementations a 1-dimensional cubic interpolation algorithm is first applied to the image rows to resize the digital image in one direction, and then subsequently applied to the image columns to resize the digital image in the other direction.
FIG. 2B illustrates the use of a cubic interpolation algorithm to apply a 2× down-sampling operation to one row of image pixels 130 from the input digital image 120 shown in FIG. 2A. To compute a particular output pixel value 136B, the cubic interpolation algorithm computes a weighted summation of the input pixels values for a pixel neighborhood 131. A set of weighting factors 132 is used to weight the pixel values in the pixel neighborhood 131 to produce weighted pixel values 134. The weighted pixel values 134 are then added together to produce the corresponding output pixel value 136B. In FIGS. 2C-2E the same cubic interpolation algorithm is applied to produce output pixel values 136C, 136D and 136E using corresponding pixel neighborhoods 131.
FIG. 2F illustrates a down-sampled digital image 140 determined by applying the cubic interpolation algorithm just described to each row and then to each column of the input digital image 120. It can be seen that the pixel values for down-sampled line pixels 141 are no longer black, but rather correspond to light gray pixel values. This represents a significant loss of image quality relative to the input digital image 120, because the visibility of the single pixel width details will be substantially reduced.
Consider the case where this approach is used by the host device processing 106 in the system 100 of FIG. 1 to produce a 300 dpi processed digital image 108, which is passed to the printer 102 via the communication link 110. If the printer engine 116 has a native resolution of 600 dpi, the printer processing 112 must then apply a resizing algorithm to perform a 2× up-sampling operation. One common resizing algorithm that is used for up-sampling operations is pixel-replication (also known as nearest-neighbor interpolation). FIG. 2G shows a pixel-replicated digital image 142 produced by applying pixel replication to the down-sampled digital image 140. Comparing the pixel-replicated digital image 142 to the input digital image 120 reveals that the pixel-replicated line pixels 143 have a much lower density than the original black line in the input digital image 120. Thus the printed image 118 will suffer from significant image quality degradation due to the round-trip 2× down-sampling/2× up-sampling operations.
A number of resizing algorithms have been developed to try to address the loss of image quality that is associated with down-sampling images having fine details.
U.S. Pat. No. 5,995,682 to Pawlicki et al., entitled “Method for resizing of a digital image,” discloses a method in which interpolation weights are determined based on local image derivative values, thereby producing images having improved continuity and sharpness characteristics.
U.S. Pat. No. 6,816,166 to Shimizu et al., entitled “Image conversion method, image processing apparatus, and image display apparatus,” discloses a method in which a linear interpolation algorithm and a nonlinear interpolation algorithm are applied to an input digital image. Weighting values are determined as a function of the image content for the input digital image, and are used to combine the two interpolated images.
U.S. Pat. No. 6,832,009 to Shezaf et al., entitled “Method and apparatus for improved image interpolation,” discloses a method for up-sampling images where an interpolation formula is changed depending on local image gradient values.
U.S. Pat. No. 7,046,390 to Atkins, entitled “System and method for scaling and enhancing color text images,” discloses a method for up-sampling text images wherein super-pixels are selected for the output image by applying a template matching algorithm to local image neighborhoods to identify characteristic image patterns.
U.S. Pat. No. 7,149,369 to Atkins, entitled “Method and system image scaling,” discloses an image resizing algorithm wherein different interpolation filters are used depending on edge characteristics determined for a local pixel neighborhood.
U.S. Pat. No. 7,200,278 to Long et al., entitled “4×4 pixel-based edge detection and edge enhancement without line buffer overhead,” discloses a method for up-sampling images wherein a rotated interpolation filter is used when diagonal edges are detected.
U.S. Patent Application Publication No. 2007/0172152 to Altunbasak et al., entitled “Method and apparatus for adjusting the resolution of a digital image,” discloses an image resizing method where interpolation filters are updated based on iteratively applying a classifier to the image pixels.